use std::{any::Any, marker::PhantomData};

pub struct Path<T>(pub T);

pub struct Query<T>(pub T);

pub struct Header<T>(pub T);

pub struct Form<T>(pub T);

pub struct Json<T>(pub T);

pub struct Multipart<T>(pub T);

pub struct WsUpgrade<S, R, SC, RC> {
    pub inner: Box<dyn Any + Send + 'static>,
    _s: PhantomData<S>,
    _sc: PhantomData<SC>,
    _r: PhantomData<R>,
    _rc: PhantomData<RC>,
}

impl<S, R, SC, RC> WsUpgrade<S, R, SC, RC> {
    pub fn new(inner: Box<dyn Any + Send + 'static>) -> Self {
        Self {
            inner,
            _s: PhantomData,
            _sc: PhantomData,
            _r: PhantomData,
            _rc: PhantomData,
        }
    }
}

pub struct __TypeMapper;

pub struct WsResponse {
    pub response: Box<dyn Any>,
}

pub struct SseResponse<T> {
    pub response: Box<dyn Any + Send + 'static>,
    _m: PhantomData<T>,
}

impl<T> SseResponse<T> {
    pub fn new(inner: Box<dyn Any + Send + 'static>) -> Self {
        Self {
            response: inner,
            _m: PhantomData,
        }
    }
}

pub struct StreamResult {
    pub response: Box<dyn Any>,
}
